﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace AirForceCDCTests
{
    /// <summary>
    /// Interaction logic for EndWindow.xaml
    /// </summary>
    public partial class EndWindow : Window
    {
        private MainWindow mainWindow;

        public EndWindow(MainWindow window)
        {
            this.mainWindow = window;
            InitializeComponent();
        }

        public void SetMessage(string message)
        {
            textBox.TextWrapping = TextWrapping.Wrap;
            textBox.Text = message;
        }

        private void close_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
            mainWindow.Close();
        }

        private void viewAgain_Click(object sender, RoutedEventArgs e)
        {
            mainWindow.ViewMissedQuestions();
            this.Close();
        }

        private void review_Click(object sender, RoutedEventArgs e)
        {
            Review review = new Review(mainWindow.getReviewQuestions());
            review.Show();
        }

        private void again_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
            mainWindow.Reload();
        }
    }
}
